/*
 * Copyright (c) 2011, Michael van der Westhuizen
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *    - Redistributions of source code must retain the above copyright
 *      notice, this list of conditions and the following disclaimer.
 *    - Redistributions in binary form must reproduce the above
 *      copyright notice, this list of conditions and the following
 *      disclaimer in the documentation and/or other materials provided
 *      with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
#ifndef PYXMLSEC1_TRANSFORM_C_MCVDW_20110104
#define PYXMLSEC1_TRANSFORM_C_MCVDW_20110104

#include "pyxmlsec.h"



static PyObject * xmlsec1_xmlSecTransformIdsGet(PyObject * self, PyObject * args)
{
    xmlSecPtrListPtr lst;

    if (NULL == (lst = xmlSecTransformIdsGet()))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformIdsGet);
        return NULL;
    }

    return xmlsec1mod_wrap_xmlSecPtrListPtr(lst); /* not owned, so no memory cleanup on failure */
}



static PyObject * xmlsec1_xmlSecTransformIdsInit(PyObject * self, PyObject * args)
{
    if (0 != xmlSecTransformIdsInit())
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformIdsInit);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformIdsShutdown(PyObject * self, PyObject * args)
{
    xmlSecTransformIdsShutdown();
    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformIdsRegisterDefault(PyObject * self, PyObject * args)
{
    if (0 != xmlSecTransformIdsRegisterDefault())
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformIdsRegisterDefault);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformIdsRegister(PyObject * self, PyObject * arg)
{
    xmlSecTransformId id;

    if (NULL == (id = xmlsec1mod_unwrap_xmlSecTransformId(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformId);
        return NULL;
    }

    if (0 != xmlSecTransformIdsRegister(id))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformIdsRegister);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformUriTypeCheck(PyObject * self, PyObject * args, PyObject * kwds)
{
    unsigned int type;
    PyObject * uri_;
    xmlChar * uri;
    PyObject * tmp;
    int ret;

    static char * kwlist[] = {"type_", "uri", NULL};

    type = xmlSecTransformUriTypeNone;
    uri_ = tmp = NULL;
    uri = NULL;
    ret = 0;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "IO", kwlist, &type, &uri_))
    {
        return NULL;
    }

    if (0 != xmlsec1_UnicodeOrBytesToXmlCharPtr(uri_, &uri, NULL))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_UnicodeOrBytesToXmlCharPtr);
        return NULL;
    }

    ret = xmlSecTransformUriTypeCheck(type, uri);
    xmlFree(uri);

    if (0 > ret)
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformUriTypeCheck);
        return NULL;
    }

    if (ret)
    {
        Py_RETURN_TRUE;
    }

    Py_RETURN_FALSE;
}



static PyObject * xmlsec1_xmlSecTransformCtxCreate(PyObject * self, PyObject * args)
{
    xmlSecTransformCtxPtr ptr;
    PyObject * obj;

    if (NULL == (ptr = xmlSecTransformCtxCreate()))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxCreate);
        return NULL;
    }

    if (NULL == (obj = xmlsec1mod_wrap_xmlSecTransformCtxPtr(ptr)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_wrap_xmlSecTransformCtxPtr);
        xmlSecTransformCtxDestroy(ptr);
        return NULL;
    }

    return obj;
}



static PyObject * xmlsec1_xmlSecTransformCtxDestroy(PyObject * self, PyObject * arg)
{
    xmlSecTransformCtxPtr ctx;

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    xmlSecTransformCtxDestroy(ctx);
    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxInitialize(PyObject * self, PyObject * arg)
{
    xmlSecTransformCtxPtr ctx;
    ctx = NULL;

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    xmlSecTransformCtxFinalize(ctx); /* needed/wise? */

    if (0 != xmlSecTransformCtxInitialize(ctx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxInitialize);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxFinalize(PyObject * self, PyObject * arg)
{
    xmlSecTransformCtxPtr ctx;
    ctx = NULL;

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    xmlSecTransformCtxFinalize(ctx);
    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxReset(PyObject * self, PyObject * arg)
{
    xmlSecTransformCtxPtr ctx;
    ctx = NULL;

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    xmlSecTransformCtxReset(ctx);
    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxCopyUserPref(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * dst_;
    PyObject * src_;
    xmlSecTransformCtxPtr dst;
    xmlSecTransformCtxPtr src;

    static char * kwlist[] = {"dst", "src", NULL};

    dst_ = src_ = NULL;
    dst = src = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &dst_, &src_))
    {
        return NULL;
    }

    if (NULL == (dst = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(dst_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (src = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(src_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlSecTransformCtxCopyUserPref(dst, src))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxCopyUserPref);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxSetUri(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    PyObject * arg3;
    xmlSecTransformCtxPtr ctx;
    xmlChar * uri;
    xmlNodePtr hereNode;
    int ret;

    static char * kwlist[] = {"ctx", "uri", "hereNode", NULL};

    arg1 = arg2 = arg3 = NULL;
    ctx = NULL;
    uri = NULL;
    hereNode = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO|O", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (Py_None == arg3)
    {
        arg3 = NULL;
    }

    if (NULL != arg3)
    {
        if (NULL == (hereNode = xmlsec1mod_unwrap_xmlNodePtr(arg3))) /* may be None */
        {
            ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
            return NULL;
        }
    }

    if (0 != xmlsec1_UnicodeOrBytesToXmlCharPtr(arg2, &uri, NULL))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_UnicodeOrBytesToXmlCharPtr);
        return NULL;
    }

    ret = xmlSecTransformCtxSetUri(ctx, uri, hereNode); /* where hereNode may be NULL... */
    xmlFree(uri);

    if (-1 == ret)
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxSetUri);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxAppend(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * ctx_;
    PyObject * transform_;
    xmlSecTransformCtxPtr ctx;
    xmlSecTransformPtr transform;

    static char * kwlist[] = {"ctx", "transform", NULL};

    ctx_ = transform_ = NULL;
    ctx = NULL;
    transform = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &ctx_, &transform_))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(ctx_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(transform_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (0 != xmlSecTransformCtxAppend(ctx, transform))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxAppend);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxPrepend(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * ctx_;
    PyObject * transform_;
    xmlSecTransformCtxPtr ctx;
    xmlSecTransformPtr transform;

    static char * kwlist[] = {"ctx", "transform", NULL};

    ctx_ = transform_ = NULL;
    ctx = NULL;
    transform = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &ctx_, &transform_))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(ctx_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(transform_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (0 != xmlSecTransformCtxPrepend(ctx, transform))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxPrepend);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxCreateAndAppend(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * ctx_;
    PyObject * id_;
    xmlSecTransformCtxPtr ctx;
    xmlSecTransformId id;
    xmlSecTransformPtr ret;

    static char * kwlist[] = {"ctx", "id", NULL};

    ctx_ = id_ = NULL;
    ctx = NULL;
    id = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &ctx_, &id_))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(ctx_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (id = xmlsec1mod_unwrap_xmlSecTransformId(id_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformId);
        return NULL;
    }

    if (NULL == (ret = xmlSecTransformCtxCreateAndAppend(ctx, id)))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxCreateAndAppend);
        return NULL;
    }

    return xmlsec1mod_wrap_xmlSecTransformPtr(ret); /* may return NULL, but we can't free the already appended transform pointer */
}



static PyObject * xmlsec1_xmlSecTransformCtxCreateAndPrepend(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * ctx_;
    PyObject * id_;
    xmlSecTransformCtxPtr ctx;
    xmlSecTransformId id;
    xmlSecTransformPtr ret;

    static char * kwlist[] = {"ctx", "id", NULL};

    ctx_ = id_ = NULL;
    ctx = NULL;
    id = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &ctx_, &id_))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(ctx_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (id = xmlsec1mod_unwrap_xmlSecTransformId(id_)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformId);
        return NULL;
    }

    if (NULL == (ret = xmlSecTransformCtxCreateAndPrepend(ctx, id)))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxCreateAndPrepend);
        return NULL;
    }

    return xmlsec1mod_wrap_xmlSecTransformPtr(ret); /* may return NULL, but we can't free the already appended transform pointer */
}



static PyObject * xmlsec1_xmlSecTransformCtxNodeRead(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformCtxPtr ctx;
    xmlNodePtr node;
    int usage_;
    xmlSecTransformUsage usage;
    xmlSecTransformPtr ret;

    static char * kwlist[] = {"ctx", "node", "usage", NULL};

    arg1 = arg2 = NULL;
    ctx = NULL;
    node = NULL;
    usage_ = 0;
    usage = xmlSecTransformUsageUnknown;
    ret = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOi", kwlist, &arg1, &arg2, &usage_))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (node = xmlsec1mod_unwrap_xmlNodePtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlNodePtr);
        return NULL;
    }

    usage = (xmlSecTransformUsage)usage_;

    if (NULL == (ret = xmlSecTransformCtxNodeRead(ctx, node, usage)))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxNodeRead);
        return NULL;
    }

    return xmlsec1mod_wrap_xmlSecTransformPtr(ret); /* if this fails we can't free the transform memory, which is already in the context */
}



static PyObject * xmlsec1_xmlSecTransformCtxNodesListRead(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformCtxPtr ctx;
    xmlNodePtr node;
    int usage_;
    xmlSecTransformUsage usage;

    static char * kwlist[] = {"ctx", "node", "usage", NULL};

    arg1 = arg2 = NULL;
    ctx = NULL;
    node = NULL;
    usage_ = 0;
    usage = xmlSecTransformUsageUnknown;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOi", kwlist, &arg1, &arg2, &usage_))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (node = xmlsec1mod_unwrap_xmlNodePtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlNodePtr);
        return NULL;
    }

    usage = (xmlSecTransformUsage)usage_;

    if (0 != xmlSecTransformCtxNodesListRead(ctx, node, usage))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxNodesListRead);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxPrepare(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    xmlSecTransformCtxPtr ctx;
    int inputDataType_;
    xmlSecTransformDataType inputDataType;

    static char * kwlist[] = {"ctx", "inputDataType", NULL};

    arg1 = NULL;
    ctx = NULL;
    inputDataType_ = 0;
    inputDataType = xmlSecTransformDataTypeUnknown;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "Oi", kwlist, &arg1, &inputDataType_))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    inputDataType = (xmlSecTransformDataType)inputDataType_;

    if (0 != xmlSecTransformCtxPrepare(ctx, inputDataType))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxPrepare);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxBinaryExecute(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformCtxPtr ctx;
    xmlSecByte * data;
    xmlSecSize dataSize;
    int ret;

    static char * kwlist[] = {"ctx", "data", NULL};

    arg1 = arg2 = NULL;
    ctx = NULL;
    data = NULL;
    dataSize = 0;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlsec1_ByteArrayOrBytesToXmlSecBytes(arg2, &data, &dataSize))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_ByteArrayOrBytesToXmlSecBytes);
        return NULL;
    }

    ret = xmlSecTransformCtxBinaryExecute(ctx, data, dataSize);
    PyMem_Del(data);

    if (0 != ret)
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxBinaryExecute);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxUriExecute(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformCtxPtr ctx;
    xmlChar * uri;
    int ret;

    static char * kwlist[] = {"ctx", "uri", NULL};

    arg1 = arg2 = NULL;
    ctx = NULL;
    uri = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlsec1_UnicodeOrBytesToXmlCharPtr(arg2, &uri, NULL))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_UnicodeOrBytesToXmlCharPtr);
        return NULL;
    }

    ret = xmlSecTransformCtxUriExecute(ctx, uri);
    xmlFree(uri);

    if (0 != ret)
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxUriExecute);
        return NULL;
    }

    Py_RETURN_NONE;
}   



static PyObject * xmlsec1_xmlSecTransformCtxXmlExecute(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformCtxPtr ctx;
    xmlSecNodeSetPtr nodes;

    static char * kwlist[] = {"ctx", "nodes", NULL};

    arg1 = arg2 = NULL;
    ctx = NULL;
    nodes = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (nodes = xmlsec1mod_unwrap_xmlSecNodeSetPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecNodeSetPtr);
        return NULL;
    }

    if (0 != xmlSecTransformCtxXmlExecute(ctx, nodes))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxXmlExecute);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxExecute(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformCtxPtr ctx;
    xmlDocPtr doc;

    static char * kwlist[] = {"ctx", "doc", NULL};

    arg1 = arg2 = NULL;
    ctx = NULL;
    doc = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (doc = xmlsec1mod_unwrap_xmlDocPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlDocPtr);
        return NULL;
    }
    
    if (0 != xmlSecTransformCtxExecute(ctx, doc))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxExecute);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxDebugDump(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformCtxPtr ctx;
    PyFileObject * output;
    FILE * fp;

    static char * kwlist[] = {"ctx", "output", NULL};

    arg1 = arg2 = NULL;
    ctx = NULL;
    fp = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (!PyFile_Check(arg2))
    {
        PyErr_SetString(PyExc_TypeError, "output must be a file opened for writing");
    }

    output = (PyFileObject *)arg2;

    if (NULL == (fp = PyFile_AsFile(arg2)))
    {
        ENSURE_EXCEPTION_SET(PyFile_AsFile);
        return NULL;
    }

    Py_INCREF(arg1);
    PyFile_IncUseCount(output);
    Py_BEGIN_ALLOW_THREADS
    xmlSecTransformCtxDebugDump(ctx, fp);
    Py_END_ALLOW_THREADS
    PyFile_DecUseCount(output);
    Py_DECREF(arg1);

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCtxDebugXmlDump(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformCtxPtr ctx;
    PyFileObject * output;
    FILE * fp;

    static char * kwlist[] = {"ctx", "output", NULL};

    arg1 = arg2 = NULL;
    ctx = NULL;
    fp = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (ctx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (!PyFile_Check(arg2))
    {
        PyErr_SetString(PyExc_TypeError, "output must be a file opened for writing");
    }

    output = (PyFileObject *)arg2;

    if (NULL == (fp = PyFile_AsFile(arg2)))
    {
        ENSURE_EXCEPTION_SET(PyFile_AsFile);
        return NULL;
    }

    Py_INCREF(arg1);
    PyFile_IncUseCount(output);
    Py_BEGIN_ALLOW_THREADS
    xmlSecTransformCtxDebugXmlDump(ctx, fp);
    Py_END_ALLOW_THREADS
    PyFile_DecUseCount(output);
    Py_DECREF(arg1);

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformCreate(PyObject * self, PyObject * arg)
{
    xmlSecTransformPtr transform;
    xmlSecTransformId id;
    PyObject * obj;

    transform = NULL;
    id = NULL;
    obj = NULL;

    if (NULL == (id = xmlsec1mod_unwrap_xmlSecTransformId(arg)))
    {
        return NULL;
    }

    if (NULL == (transform = xmlSecTransformCreate(id)))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCreate);
        return NULL;
    }

    if (NULL == (obj = xmlsec1mod_wrap_xmlSecTransformPtr(transform)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_wrap_xmlSecTransformPtr);
        xmlSecTransformDestroy(transform);
        return NULL;
    }

    return obj;
}



static PyObject * xmlsec1_xmlSecTransformDestroy(PyObject * self, PyObject * arg)
{
    xmlSecTransformPtr xform;

    if (NULL == (xform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    xmlSecTransformDestroy(xform);
    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformNodeRead(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    int usage_;
    PyObject * arg3;
    xmlNodePtr node;
    xmlSecTransformUsage usage;
    xmlSecTransformCtxPtr transformCtx;
    xmlSecTransformPtr ret;
    PyObject * obj;

    static char * kwlist[] = {"node", "usage", "transformCtx", NULL};

    arg1 = arg3 = NULL;
    usage_ = 0;
    node = NULL;
    usage = xmlSecTransformUsageUnknown;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OiO", kwlist, &arg1, &usage_, &arg3))
    {
        return NULL;
    }

    if (NULL == (node = xmlsec1mod_unwrap_xmlNodePtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlNodePtr);
        return NULL;
    }

    usage = (xmlSecTransformUsage)usage_;

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (ret = xmlSecTransformNodeRead(node, usage, transformCtx)))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxNodesListRead);
        return NULL;
    }

    if (NULL == (obj = xmlsec1mod_wrap_xmlSecTransformPtr(ret)))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCtxNodesListRead);
        xmlSecTransformDestroy(ret);
        return NULL;
    }

    return obj;
}



static PyObject * xmlsec1_xmlSecTransformPump(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    PyObject * arg3;
    xmlSecTransformPtr left;
    xmlSecTransformPtr right;
    xmlSecTransformCtxPtr transformCtx;

    static char * kwlist[] = {"left", "right", "transformCtx", NULL};

    arg1 = arg2 = arg3 = NULL;
    left = right = NULL;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOO", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (left = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (right = xmlsec1mod_unwrap_xmlSecTransformPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlSecTransformPump(left, right, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformPump);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformSetKey(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformPtr transform;
    xmlSecKeyPtr key;

    static char * kwlist[] = {"transform", "key", NULL};

    arg1 = arg2 = NULL;
    transform = NULL;
    key = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (key = xmlsec1mod_unwrap_xmlSecKeyPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecKeyPtr);
        return NULL;
    }

    if (0 != xmlSecTransformSetKey(transform, key))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformSetKeyReq(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformPtr transform;
    xmlSecKeyReqPtr keyReq;

    static char * kwlist[] = {"transform", "keyReq", NULL};

    arg1 = arg2 = NULL;
    transform = NULL;
    keyReq = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (keyReq = xmlsec1mod_unwrap_xmlSecKeyReqPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecKeyReqPtr);
        return NULL;
    }

    if (0 != xmlSecTransformSetKeyReq(transform, keyReq))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformSetKeyReq);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformVerify(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    PyObject * arg3;
    xmlSecTransformPtr transform;
    xmlSecByte * data;
    xmlSecSize dataSize;
    xmlSecTransformCtxPtr transformCtx;
    int ret;

    static char * kwlist[] = {"transform", "data", "transformCtx", NULL};

    arg1 = arg2 = arg3 = NULL;
    transform = NULL;
    data = NULL;
    dataSize = 0;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOO", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlsec1_ByteArrayOrBytesToXmlSecBytes(arg2, &data, &dataSize))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_ByteArrayOrBytesToXmlSecBytes);
        return NULL;
    }

    ret = xmlSecTransformVerify(transform, data, dataSize, transformCtx);
    PyMem_Del(data);

    if (0 != ret)
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformVerify);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformVerifyNodeContent(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    PyObject * arg3;
    xmlSecTransformPtr transform;
    xmlNodePtr node;
    xmlSecTransformCtxPtr transformCtx;

    static char * kwlist[] = {"transform", "node", "transformCtx", NULL};

    arg1 = arg2 = arg3 = NULL;
    transform = NULL;
    node = NULL;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOO", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (node = xmlsec1mod_unwrap_xmlNodePtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlNodePtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlSecTransformVerifyNodeContent(transform, node, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformVerifyNodeContent);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformGetDataType(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    int arg2;
    PyObject * arg3;
    xmlSecTransformPtr transform;
    xmlSecTransformMode mode;
    xmlSecTransformCtxPtr transformCtx;

    static char * kwlist[] = {"transform", "mode", "transformCtx", NULL};

    arg1 = arg3 = NULL;
    arg2 = 0;
    transform = NULL;
    mode = xmlSecTransformModeNone;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OiO", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    mode = (xmlSecTransformMode)arg2;

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    return PyInt_FromLong((long)xmlSecTransformGetDataType(transform, mode, transformCtx));
}



static PyObject * xmlsec1_xmlSecTransformPushBin(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    int final;
    PyObject * arg4;
    xmlSecTransformPtr transform;
    xmlSecByte * data;
    xmlSecSize dataSize;
    xmlSecTransformCtxPtr transformCtx;
    int ret;

    static char * kwlist[] = {"transform", "data", "final", "transformCtx", NULL};

    arg1 = arg2 = arg4 = NULL;
    final = 0;
    transform = NULL;
    data = NULL;
    dataSize = 0;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOiO", kwlist, &arg1, &arg2, &final, &arg4))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg4)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlsec1_ByteArrayOrBytesToXmlSecBytes(arg2, &data, &dataSize))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_ByteArrayOrBytesToXmlSecBytes);
        return NULL;
    }

    ret = xmlSecTransformPushBin(transform, data, dataSize, final, transformCtx);
    PyMem_Del(data);

    if (0 != ret)
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformPushBin);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformPopBin(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    int maxDataSize;
    PyObject * arg3;
    xmlSecTransformPtr transform;
    xmlSecTransformCtxPtr transformCtx;
    xmlSecByte * data;
    xmlSecSize dataSize;
    PyObject * ret;

    static char * kwlist[] = {"transform", "maxDataSize", "transformCtx", NULL};

    arg1 = arg3 = NULL;
    maxDataSize = 0;
    transform = NULL;
    transformCtx = NULL;
    data = NULL;
    dataSize = 0;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OiO", kwlist, &arg1, &maxDataSize, &arg3))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (data = PyMem_New(xmlSecByte, maxDataSize)))
    {
        return PyErr_NoMemory();
    }

    if (0 != xmlSecTransformPopBin(transform, data, maxDataSize, &dataSize, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformPopBin);
        PyMem_Del(data);
        return NULL;
    }

    ret = PyByteArray_FromStringAndSize((char *)data, (Py_ssize_t)dataSize);
    PyMem_Del(data);
    return ret;
}



static PyObject * xmlsec1_xmlSecTransformPushXml(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    PyObject * arg3;
    xmlSecTransformPtr transform;
    xmlSecNodeSetPtr nodes;
    xmlSecTransformCtxPtr transformCtx;

    static char * kwlist[] = {"transform", "nodes", "transformCtx", NULL};

    arg1 = arg2 = arg3 = NULL;
    transform = NULL;
    nodes = NULL;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOO", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (nodes = xmlsec1mod_unwrap_xmlSecNodeSetPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecNodeSetPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlSecTransformPushXml(transform, nodes, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformPushXml);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformPopXml(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformPtr transform;
    xmlSecTransformCtxPtr transformCtx;
    xmlSecNodeSetPtr nodes;
    PyObject * ret;

    static char * kwlist[] = {"transform", "transformCtx", NULL};

    arg1 = arg2 = NULL;
    transform = NULL;
    transformCtx = NULL;
    nodes = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlSecTransformPopXml(transform, &nodes, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformPopXml);
        return NULL;
    }

    if (NULL == (ret = xmlsec1mod_wrap_xmlSecNodeSetPtr(nodes)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_wrap_xmlSecNodeSetPtr);
        xmlSecNodeSetDestroy(nodes);
        return NULL;
    }

    return ret;
}



static PyObject * xmlsec1_xmlSecTransformExecute(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    int last;
    PyObject * arg3;
    xmlSecTransformPtr transform;
    xmlSecTransformCtxPtr transformCtx;

    static char * kwlist[] = {"transform", "last", "transformCtx", NULL};

    arg1 = arg3 = NULL;
    last = 0;
    transform = NULL;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OiO", kwlist, &arg1, &last, &arg3))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlSecTransformExecute(transform, last, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformExecute);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformDebugDump(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformPtr transform;
    PyFileObject * output;
    FILE * fp;

    static char * kwlist[] = {"transform", "output", NULL};

    arg1 = arg2 = NULL;
    transform = NULL;
    fp = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (!PyFile_Check(arg2))
    {
        PyErr_SetString(PyExc_TypeError, "output must be a file opened for writing");
    }

    output = (PyFileObject *)arg2;

    if (NULL == (fp = PyFile_AsFile(arg2)))
    {
        ENSURE_EXCEPTION_SET(PyFile_AsFile);
        return NULL;
    }

    Py_INCREF(arg1);
    PyFile_IncUseCount(output);
    Py_BEGIN_ALLOW_THREADS
    xmlSecTransformDebugDump(transform, fp);
    Py_END_ALLOW_THREADS
    PyFile_DecUseCount(output);
    Py_DECREF(arg1);

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformDebugXmlDump(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformPtr transform;
    PyFileObject * output;
    FILE * fp;

    static char * kwlist[] = {"transform", "output", NULL};

    arg1 = arg2 = NULL;
    transform = NULL;
    fp = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (!PyFile_Check(arg2))
    {
        PyErr_SetString(PyExc_TypeError, "output must be a file opened for writing");
    }

    output = (PyFileObject *)arg2;

    if (NULL == (fp = PyFile_AsFile(arg2)))
    {
        ENSURE_EXCEPTION_SET(PyFile_AsFile);
        return NULL;
    }

    Py_INCREF(arg1);
    PyFile_IncUseCount(output);
    Py_BEGIN_ALLOW_THREADS
    xmlSecTransformDebugXmlDump(transform, fp);
    Py_END_ALLOW_THREADS
    PyFile_DecUseCount(output);
    Py_DECREF(arg1);

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformGetName(PyObject * self, PyObject * arg)
{
    xmlSecTransformPtr transform;

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    return PyBytes_FromString((const char *)xmlSecTransformGetName(transform));
}



static PyObject * xmlsec1_xmlSecTransformIsValid(PyObject * self, PyObject * arg)
{
    xmlSecTransformPtr transform;

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (xmlSecTransformIsValid(transform))
    {
        Py_RETURN_TRUE;
    }

    Py_RETURN_FALSE;
}



static PyObject * xmlsec1_xmlSecTransformCheckId(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformPtr transform;
    xmlSecTransformId i;

    static char * kwlist[] = {"transform", "i", NULL};

    arg1 = arg2 = NULL;
    transform = NULL;
    i = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (i = xmlsec1mod_unwrap_xmlSecTransformId(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformId);
        return NULL;
    }

    if (xmlSecTransformCheckId(transform, i))
    {
        Py_RETURN_TRUE;
    }

    Py_RETURN_FALSE;
}



static PyObject * xmlsec1_xmlSecTransformCheckSize(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    int arg2;
    xmlSecTransformPtr transform;
    xmlSecSize size;

    static char * kwlist[] = {"transform", "size", NULL};

    arg1 = NULL;
    arg2 = 0;
    transform = NULL;
    size = 0;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "Oi", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    size = (xmlSecSize)arg2;

    if (xmlSecTransformCheckSize(transform, size))
    {
        Py_RETURN_TRUE;
    }

    Py_RETURN_FALSE;
}



static PyObject * xmlsec1_xmlSecTransformConnect(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    PyObject * arg3;
    xmlSecTransformPtr left;
    xmlSecTransformPtr right;
    xmlSecTransformCtxPtr transformCtx;

    static char * kwlist[] = {"left", "right", "transformCtx", NULL};

    arg1 = arg2 = arg3 = NULL;
    left = right = NULL;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OiO", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (left = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (right = xmlsec1mod_unwrap_xmlSecTransformPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlSecTransformConnect(left, right, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformConnect);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformRemove(PyObject * self, PyObject * arg)
{
    xmlSecTransformPtr transform;

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    xmlSecTransformRemove(transform);
    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformDefaultGetDataType(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    int arg2;
    PyObject * arg3;
    xmlSecTransformPtr transform;
    xmlSecTransformMode mode;
    xmlSecTransformCtxPtr transformCtx;
    xmlSecTransformDataType ret;

    static char * kwlist[] = {"transform", "mode", "transformCtx", NULL};

    arg1 = arg3 = NULL;
    arg2 = 0;
    transform = NULL;
    mode = xmlSecTransformModeNone;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OiO", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    mode = (xmlSecTransformMode)arg2;

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    ret = xmlSecTransformDefaultGetDataType(transform, mode, transformCtx);
    return PyInt_FromLong((long)ret);
}



static PyObject * xmlsec1_xmlSecTransformDefaultPushBin(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    int final;
    PyObject * arg4;
    xmlSecTransformPtr transform;
    xmlSecByte * data;
    xmlSecSize dataSize;
    xmlSecTransformCtxPtr transformCtx;
    int ret;

    static char * kwlist[] = {"transform", "data", "final", "transformCtx", NULL};

    arg1 = arg2 = arg4 = NULL;
    final = 0;
    transform = NULL;
    data = NULL;
    dataSize = 0;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOiO", kwlist, &arg1, &arg2, &final, &arg4))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg4)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlsec1_ByteArrayOrBytesToXmlSecBytes(arg2, &data, &dataSize))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_ByteArrayOrBytesToXmlSecBytes);
        return NULL;
    }

    ret = xmlSecTransformDefaultPushBin(transform, data, dataSize, final, transformCtx);
    PyMem_Del(data);

    if (0 != ret)
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformDefaultPushBin);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformDefaultPopBin(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    int maxDataSize;
    PyObject * arg3;
    xmlSecTransformPtr transform;
    xmlSecTransformCtxPtr transformCtx;
    xmlSecByte * data;
    xmlSecSize dataSize;
    PyObject * ret;

    static char * kwlist[] = {"transform", "maxDataSize", "transformCtx", NULL};

    arg1 = arg3 = NULL;
    maxDataSize = 0;
    transform = NULL;
    transformCtx = NULL;
    data = NULL;
    dataSize = 0;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OiO", kwlist, &arg1, &maxDataSize, &arg3))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (data = PyMem_New(xmlSecByte, maxDataSize)))
    {
        return PyErr_NoMemory();
    }

    if (0 != xmlSecTransformDefaultPopBin(transform, data, maxDataSize, &dataSize, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformDefaultPopBin);
        PyMem_Del(data);
        return NULL;
    }

    ret = PyByteArray_FromStringAndSize((char *)data, (Py_ssize_t)dataSize);
    PyMem_Del(data);
    return ret;
}



static PyObject * xmlsec1_xmlSecTransformDefaultPushXml(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    PyObject * arg3;
    xmlSecTransformPtr transform;
    xmlSecNodeSetPtr nodes;
    xmlSecTransformCtxPtr transformCtx;

    static char * kwlist[] = {"transform", "nodes", "transformCtx", NULL};

    arg1 = arg2 = arg3 = NULL;
    transform = NULL;
    nodes = NULL;
    transformCtx = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOO", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (nodes = xmlsec1mod_unwrap_xmlSecNodeSetPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecNodeSetPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg3)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlSecTransformDefaultPushXml(transform, nodes, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformPushXml);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformDefaultPopXml(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformPtr transform;
    xmlSecTransformCtxPtr transformCtx;
    xmlSecNodeSetPtr nodes;
    PyObject * ret;

    static char * kwlist[] = {"transform", "transformCtx", NULL};

    arg1 = arg2 = NULL;
    transform = NULL;
    transformCtx = NULL;
    nodes = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (0 != xmlSecTransformDefaultPopXml(transform, &nodes, transformCtx))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformDefaultPopXml);
        return NULL;
    }

    if (NULL == (ret = xmlsec1mod_wrap_xmlSecNodeSetPtr(nodes)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_wrap_xmlSecNodeSetPtr);
        xmlSecNodeSetDestroy(nodes);
        return NULL;
    }

    return ret;
}



static PyObject * xmlsec1_xmlSecTransformCreateOutputBuffer(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformPtr transform;
    xmlSecTransformCtxPtr transformCtx;
    xmlOutputBufferPtr buffer;
    PyObject * ret;

    static char * kwlist[] = {"transform", "transformCtx", NULL};

    arg1 = arg2 = NULL;
    transform = NULL;
    transformCtx = NULL;
    buffer = NULL;
    ret = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (buffer = xmlSecTransformCreateOutputBuffer(transform, transformCtx)))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCreateOutputBuffer);
        return NULL;
    }

    if (NULL == (ret = xmlsec1mod_wrap_xmlOutputBufferPtr(buffer)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_wrap_xmlOutputBufferPtr);
        /* XXX: free? how? doesn't seem particularly well documented - I can't really see this memory every being freed, unless I'm missing something... */
        return NULL;
    }

    return ret;
}



static PyObject * xmlsec1_xmlSecTransformCreateInputBuffer(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecTransformPtr transform;
    xmlSecTransformCtxPtr transformCtx;
    xmlParserInputBufferPtr buffer;
    PyObject * ret;

    static char * kwlist[] = {"transform", "transformCtx", NULL};

    arg1 = arg2 = NULL;
    transform = NULL;
    transformCtx = NULL;
    buffer = NULL;
    ret = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }
        
    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {   
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    if (NULL == (transformCtx = xmlsec1mod_unwrap_xmlSecTransformCtxPtr(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformCtxPtr);
        return NULL;
    }

    if (NULL == (buffer = xmlSecTransformCreateInputBuffer(transform, transformCtx)))
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformCreateInputBuffer);
        return NULL;
    }

    if (NULL == (ret = xmlsec1mod_wrap_xmlParserInputBufferPtr(buffer)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_wrap_xmlParserInputBufferPtr);
        /* XXX: free? how? doesn't seem particularly well documented - I can't really see this memory every being freed, unless I'm missing something... */
        return NULL;
    }

    return ret;
}



static PyObject * xmlsec1_xmlSecTransformKlassGetName(PyObject * self, PyObject * arg)
{
    xmlSecTransformId transformId;

    if (NULL == (transformId = xmlsec1mod_unwrap_xmlSecTransformId(arg)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformId);
        return NULL;
    }

    return PyBytes_FromString((const char *)xmlSecTransformKlassGetName(transformId));
}



static PyObject * xmlsec1_xmlSecTransformIdListGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecPtrListId(xmlSecTransformIdListGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformIdListFind(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecPtrListPtr list;
    xmlSecTransformId transformId;

    static char * kwlist[] = {"tlist", "transformId", NULL};

    arg1 = arg2 = NULL;
    list = NULL;
    transformId = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (list = xmlsec1mod_unwrap_xmlSecPtrListPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecPtrListPtr);
        return NULL;
    }

    if (NULL == (transformId = xmlsec1mod_unwrap_xmlSecTransformId(arg2)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformId);
        return NULL;
    }

    if (xmlSecTransformIdListFind(list, transformId))
    {
        Py_RETURN_TRUE;
    }

    Py_RETURN_FALSE;
}



xmlSecTransformId xmlSecTransformIdListFindByHref(xmlSecPtrListPtr list, const xmlChar *href, xmlSecTransformUsage usage);
static PyObject * xmlsec1_xmlSecTransformIdListFindByHref(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    int arg3;
    xmlSecPtrListPtr list;
    xmlChar * href;
    xmlSecTransformUsage usage;
    xmlSecTransformId ret;

    static char * kwlist[] = {"tlist", "href", "usage",  NULL};

    arg1 = arg2 = NULL;
    arg3 = 0;
    list = NULL;
    href = NULL;
    usage = xmlSecTransformUsageUnknown;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOi", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (list = xmlsec1mod_unwrap_xmlSecPtrListPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecPtrListPtr);
        return NULL;
    }

    if (0 != xmlsec1_UnicodeOrBytesToXmlCharPtr(arg2, &href, NULL))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_UnicodeOrBytesToXmlCharPtr);
        return NULL;
    }

    usage = (xmlSecTransformUsage)arg3;

    if (NULL == (ret = xmlSecTransformIdListFindByHref(list, href, usage)))
    {
        xmlFree(href);
        Py_RETURN_NONE;
    }

    xmlFree(href);
    return xmlsec1mod_wrap_xmlSecTransformId(ret);
}



static PyObject * xmlsec1_xmlSecTransformIdListFindByName(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    int arg3;
    xmlSecPtrListPtr list;
    xmlChar * name;
    xmlSecTransformUsage usage;
    xmlSecTransformId ret;

    static char * kwlist[] = {"tlist", "name", "usage", NULL};

    arg1 = arg2 = NULL;
    arg3 = 0;
    list = NULL;
    name = NULL;
    usage = xmlSecTransformUsageUnknown;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOi", kwlist, &arg1, &arg2, &arg3))
    {
        return NULL;
    }

    if (NULL == (list = xmlsec1mod_unwrap_xmlSecPtrListPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecPtrListPtr);
        return NULL;
    }

    if (0 != xmlsec1_UnicodeOrBytesToXmlCharPtr(arg2, &name, NULL))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_UnicodeOrBytesToXmlCharPtr);
        return NULL;
    }

    usage = (xmlSecTransformUsage)arg3;

    if (NULL == (ret = xmlSecTransformIdListFindByName(list, name, usage)))
    {
        xmlFree(name);
        Py_RETURN_NONE;
    }

    xmlFree(name);
    return xmlsec1mod_wrap_xmlSecTransformId(ret);
}



static PyObject * xmlsec1_xmlSecTransformIdListDebugDump(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecPtrListPtr list;
    PyFileObject * output;
    FILE * fp;

    static char * kwlist[] = {"tlist", "output", NULL};

    arg1 = arg2 = NULL;
    list = NULL;
    fp = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (list = xmlsec1mod_unwrap_xmlSecPtrListPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecPtrListPtr);
        return NULL;
    }

    if (!PyFile_Check(arg2))
    {
        PyErr_SetString(PyExc_TypeError, "output must be a file opened for writing");
    }

    output = (PyFileObject *)arg2;

    if (NULL == (fp = PyFile_AsFile(arg2)))
    {
        ENSURE_EXCEPTION_SET(PyFile_AsFile);
        return NULL;
    }

    Py_INCREF(arg1);
    PyFile_IncUseCount(output);
    Py_BEGIN_ALLOW_THREADS
    xmlSecTransformIdListDebugDump(list, fp);
    Py_END_ALLOW_THREADS
    PyFile_DecUseCount(output);
    Py_DECREF(arg1);

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformIdListDebugXmlDump(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    xmlSecPtrListPtr list;
    PyFileObject * output;
    FILE * fp;

    static char * kwlist[] = {"tlist", "output", NULL};

    arg1 = arg2 = NULL;
    list = NULL;
    fp = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (list = xmlsec1mod_unwrap_xmlSecPtrListPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecPtrListPtr);
        return NULL;
    }

    if (!PyFile_Check(arg2))
    {
        PyErr_SetString(PyExc_TypeError, "output must be a file opened for writing");
    }

    output = (PyFileObject *)arg2;

    if (NULL == (fp = PyFile_AsFile(arg2)))
    {
        ENSURE_EXCEPTION_SET(PyFile_AsFile);
        return NULL;
    }

    Py_INCREF(arg1);
    PyFile_IncUseCount(output);
    Py_BEGIN_ALLOW_THREADS
    xmlSecTransformIdListDebugXmlDump(list, fp);
    Py_END_ALLOW_THREADS
    PyFile_DecUseCount(output);
    Py_DECREF(arg1);

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformBase64GetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformBase64GetKlass());
}



static PyObject * xmlsec1_xmlSecTransformBase64SetLineSize(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    int arg2;
    xmlSecTransformPtr transform;
    xmlSecSize lineSize;

    static char * kwlist[] = {"transform", "lineSize", NULL};

    arg1 = NULL;
    arg2 = 0;
    transform = NULL;
    lineSize = 0;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "Oi", kwlist, &arg1, &arg2))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    lineSize = (xmlSecSize)arg2;
    xmlSecTransformBase64SetLineSize(transform, lineSize);
    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformInclC14NGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformInclC14NGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformInclC14NWithCommentsGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformInclC14NWithCommentsGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformInclC14N11GetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformInclC14N11GetKlass());
}



static PyObject * xmlsec1_xmlSecTransformInclC14N11WithCommentsGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformInclC14N11WithCommentsGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformExclC14NGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformExclC14NGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformExclC14NWithCommentsGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformExclC14NWithCommentsGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformEnvelopedGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformEnvelopedGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformXPathGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformXPathGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformXPath2GetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformXPath2GetKlass());
}



static PyObject * xmlsec1_xmlSecTransformXPointerGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformXPointerGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformXPointerSetExpr(PyObject * self, PyObject * args, PyObject * kwds)
{
    PyObject * arg1;
    PyObject * arg2;
    int arg3;
    PyObject * arg4;
    xmlSecTransformPtr transform;
    xmlChar * expr;
    xmlSecNodeSetType nodeSetType;
    xmlNodePtr hereNode;
    int ret;

    static char * kwlist[] = {"transform", "expr", "nodeSetType", "hereNode", NULL};

    arg1 = arg2 = arg4 = NULL;
    arg3 = 0;
    transform = NULL;
    expr = NULL;
    nodeSetType = xmlSecNodeSetNormal;
    hereNode = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOiO", kwlist, &arg1, &arg2, &arg3, &arg4))
    {
        return NULL;
    }

    if (NULL == (transform = xmlsec1mod_unwrap_xmlSecTransformPtr(arg1)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlSecTransformPtr);
        return NULL;
    }

    nodeSetType = (xmlSecNodeSetType)arg3;

    if (NULL == (hereNode = xmlsec1mod_unwrap_xmlNodePtr(arg4)))
    {
        ENSURE_EXCEPTION_SET(xmlsec1mod_unwrap_xmlNodePtr);
        return NULL;
    }

    if (0 != xmlsec1_UnicodeOrBytesToXmlCharPtr(arg2, &expr, NULL))
    {
        ENSURE_EXCEPTION_SET(xmlsec1_UnicodeOrBytesToXmlCharPtr);
        return NULL;
    }

    ret = xmlSecTransformXPointerSetExpr(transform, expr, nodeSetType, hereNode);
    xmlFree(expr);

    if (-1 == ret)
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformXPointerSetExpr);
        return NULL;
    }

    Py_RETURN_NONE;
}



static PyObject * xmlsec1_xmlSecTransformXsltGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformXsltGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformRemoveXmlTagsC14NGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformRemoveXmlTagsC14NGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformVisa3DHackGetKlass(PyObject * self, PyObject * args)
{
    return xmlsec1mod_wrap_xmlSecTransformId(xmlSecTransformVisa3DHackGetKlass());
}



static PyObject * xmlsec1_xmlSecTransformVisa3DHackSetID(PyObject * self, PyObject * args, PyObject * kwds)
{
    xmlSecTransformPtr transform;
    xmlChar * id;
    PyObject * transform_;
    PyObject * id_;
    PyObject * tmp;
    int ret;

    static char * kwlist[] = {"transform", "id", NULL};
    transform = NULL;
    id = NULL;
    transform_ = NULL;
    id_ = NULL;
    tmp = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO", kwlist, &transform_, &id_))
    {
        return NULL;
    }

    transform = xmlsec1mod_unwrap_xmlSecTransformPtr(transform_);

    if (PyBytes_Check(id_))
    {
        id = xmlCharStrdup(PyBytes_AsString(id_));

        if (NULL == id)
        {
            return PyErr_NoMemory();
        }
    }
    else if (PyUnicode_Check(id_))
    {
        if (NULL == (tmp = PyUnicode_AsUTF8String(id_)))
        {
            return NULL;
        }

        id = xmlCharStrdup(PyString_AsString(tmp));
        Py_CLEAR(tmp);

        if (NULL == id)
        {
            return PyErr_NoMemory();
        }
    }
    else
    {
        /* XXX: raise a more appropriate error */
        return NULL;
    }

    ret = xmlSecTransformVisa3DHackSetID(transform, id);
    xmlFree(id);

    if (0 != ret)
    {
        ENSURE_EXCEPTION_SET(xmlSecTransformVisa3DHackSetID);
        return NULL;
    }

    Py_RETURN_NONE;
}

#if 0
-- #define XMLSEC_TRANSFORM_BINARY_CHUNK
-- xmlSecPtrListPtr xmlSecTransformIdsGet(void);
-- int xmlSecTransformIdsInit(void);
-- void xmlSecTransformIdsShutdown(void);
-- int xmlSecTransformIdsRegisterDefault(void);
-- int xmlSecTransformIdsRegister(xmlSecTransformId id);
-- enum xmlSecTransformStatus;
-- enum xmlSecTransformMode;
-- enum xmlSecTransformOperation;
-- typedef xmlSecTransformUriType;
-- #define xmlSecTransformUriTypeNone
-- #define xmlSecTransformUriTypeEmpty
-- #define xmlSecTransformUriTypeSameDocument
-- #define xmlSecTransformUriTypeLocal
-- #define xmlSecTransformUriTypeRemote
-- #define xmlSecTransformUriTypeAny
-- int xmlSecTransformUriTypeCheck(xmlSecTransformUriType type, const xmlChar *uri);
-- typedef xmlSecTransformDataType;
-- #define xmlSecTransformDataTypeUnknown
-- #define xmlSecTransformDataTypeBin
-- #define xmlSecTransformDataTypeXml
-- typedef xmlSecTransformUsage;
-- #define xmlSecTransformUsageUnknown
-- #define xmlSecTransformUsageDSigTransform
-- #define xmlSecTransformUsageC14NMethod
-- #define xmlSecTransformUsageDigestMethod
-- #define xmlSecTransformUsageSignatureMethod
-- #define xmlSecTransformUsageEncryptionMethod
-- #define xmlSecTransformUsageAny

-- XXX: int (*xmlSecTransformCtxPreExecuteCallback) (xmlSecTransformCtxPtr transformCtx);
-- #define XMLSEC_TRANSFORMCTX_FLAGS_USE_VISA3D_HACK
-- struct xmlSecTransformCtx;
-- xmlSecTransformCtxPtr xmlSecTransformCtxCreate(void);
-- void xmlSecTransformCtxDestroy(xmlSecTransformCtxPtr ctx);
-- int xmlSecTransformCtxInitialize(xmlSecTransformCtxPtr ctx);
-- void xmlSecTransformCtxFinalize(xmlSecTransformCtxPtr ctx);
-- void xmlSecTransformCtxReset(xmlSecTransformCtxPtr ctx);
-- int xmlSecTransformCtxCopyUserPref(xmlSecTransformCtxPtr dst, xmlSecTransformCtxPtr src);
-- int xmlSecTransformCtxSetUri(xmlSecTransformCtxPtr ctx, const xmlChar *uri, xmlNodePtr hereNode);
-- int xmlSecTransformCtxAppend(xmlSecTransformCtxPtr ctx, xmlSecTransformPtr transform);
-- int xmlSecTransformCtxPrepend(xmlSecTransformCtxPtr ctx, xmlSecTransformPtr transform);
-- xmlSecTransformPtr xmlSecTransformCtxCreateAndAppend(xmlSecTransformCtxPtr ctx, xmlSecTransformId id);
-- xmlSecTransformPtr xmlSecTransformCtxCreateAndPrepend(xmlSecTransformCtxPtr ctx, xmlSecTransformId id);
-- xmlSecTransformPtr xmlSecTransformCtxNodeRead(xmlSecTransformCtxPtr ctx, xmlNodePtr node, xmlSecTransformUsage usage);
-- int xmlSecTransformCtxNodesListRead(xmlSecTransformCtxPtr ctx, xmlNodePtr node, xmlSecTransformUsage usage);
-- int xmlSecTransformCtxPrepare(xmlSecTransformCtxPtr ctx, xmlSecTransformDataType inputDataType);
-- int xmlSecTransformCtxBinaryExecute(xmlSecTransformCtxPtr ctx, const xmlSecByte *data, xmlSecSize dataSize);
-- int xmlSecTransformCtxUriExecute(xmlSecTransformCtxPtr ctx, const xmlChar *uri);
-- int xmlSecTransformCtxXmlExecute(xmlSecTransformCtxPtr ctx, xmlSecNodeSetPtr nodes);
-- int xmlSecTransformCtxExecute(xmlSecTransformCtxPtr ctx, xmlDocPtr doc);
-- void xmlSecTransformCtxDebugDump(xmlSecTransformCtxPtr ctx, FILE *output);
-- void xmlSecTransformCtxDebugXmlDump(xmlSecTransformCtxPtr ctx, FILE *output);


-- struct xmlSecTransform;
-- xmlSecTransformPtr xmlSecTransformCreate(xmlSecTransformId id);
-- void xmlSecTransformDestroy(xmlSecTransformPtr transform);
-- xmlSecTransformPtr xmlSecTransformNodeRead(xmlNodePtr node, xmlSecTransformUsage usage, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformPump(xmlSecTransformPtr left, xmlSecTransformPtr right, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformSetKey(xmlSecTransformPtr transform, xmlSecKeyPtr key);
-- int xmlSecTransformSetKeyReq(xmlSecTransformPtr transform, xmlSecKeyReqPtr keyReq);
-- int xmlSecTransformVerify(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformVerifyNodeContent(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);
-- xmlSecTransformDataType xmlSecTransformGetDataType(xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformPushBin(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformPopBin(xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformPushXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformPopXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformExecute(xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transformCtx);
-- void xmlSecTransformDebugDump(xmlSecTransformPtr transform, FILE *output);
-- void xmlSecTransformDebugXmlDump(xmlSecTransformPtr transform, FILE *output);
-- #define xmlSecTransformGetName(transform)
-- #define xmlSecTransformIsValid(transform)
-- XX: Broken XX #define xmlSecTransformCheckType(transform, t)
-- #define xmlSecTransformCheckId(transform, i)
-- #define xmlSecTransformCheckSize(transform, size)
-- int xmlSecTransformConnect(xmlSecTransformPtr left, xmlSecTransformPtr right, xmlSecTransformCtxPtr transformCtx);
-- void xmlSecTransformRemove(xmlSecTransformPtr transform);
-- xmlSecTransformDataType xmlSecTransformDefaultGetDataType(xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformDefaultPushBin(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformDefaultPopBin(xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformDefaultPushXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);
-- int xmlSecTransformDefaultPopXml(xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx);
-- xmlOutputBufferPtr xmlSecTransformCreateOutputBuffer(xmlSecTransformPtr transform, xmlSecTransformCtxPtr transformCtx);
-- xmlParserInputBufferPtr xmlSecTransformCreateInputBuffer (xmlSecTransformPtr transform, xmlSecTransformCtxPtr transformCtx);
-- int (*xmlSecTransformInitializeMethod)(xmlSecTransformPtr transform);
-- void (*xmlSecTransformFinalizeMethod)(xmlSecTransformPtr transform);
-- xmlSecTransformDataType (*xmlSecTransformGetDataTypeMethod) (xmlSecTransformPtr transform, xmlSecTransformMode mode, xmlSecTransformCtxPtr transformCtx);
-- int (*xmlSecTransformNodeReadMethod)(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);
-- int (*xmlSecTransformNodeWriteMethod)(xmlSecTransformPtr transform, xmlNodePtr node, xmlSecTransformCtxPtr transformCtx);
-- int (*xmlSecTransformSetKeyRequirementsMethod) (xmlSecTransformPtr transform, xmlSecKeyReqPtr keyReq);
-- int (*xmlSecTransformSetKeyMethod)(xmlSecTransformPtr transform, xmlSecKeyPtr key);
-- int (*xmlSecTransformVerifyMethod)(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, xmlSecTransformCtxPtr transformCtx);
-- int (*xmlSecTransformPushBinMethod)(xmlSecTransformPtr transform, const xmlSecByte *data, xmlSecSize dataSize, int final, xmlSecTransformCtxPtr transformCtx);
-- int (*xmlSecTransformPopBinMethod)(xmlSecTransformPtr transform, xmlSecByte *data, xmlSecSize maxDataSize, xmlSecSize *dataSize, xmlSecTransformCtxPtr transformCtx);
-- int (*xmlSecTransformPushXmlMethod)(xmlSecTransformPtr transform, xmlSecNodeSetPtr nodes, xmlSecTransformCtxPtr transformCtx);
-- int (*xmlSecTransformPopXmlMethod)(xmlSecTransformPtr transform, xmlSecNodeSetPtr *nodes, xmlSecTransformCtxPtr transformCtx);
-- int (*xmlSecTransformExecuteMethod)(xmlSecTransformPtr transform, int last, xmlSecTransformCtxPtr transformCtx);
-- struct xmlSecTransformKlass;
-- #define xmlSecTransformKlassGetName(klass)
-- #define xmlSecTransformIdListId
-- xmlSecPtrListId xmlSecTransformIdListGetKlass(void);
-- int xmlSecTransformIdListFind(xmlSecPtrListPtr list, xmlSecTransformId transformId);
-- xmlSecTransformId xmlSecTransformIdListFindByHref(xmlSecPtrListPtr list, const xmlChar *href, xmlSecTransformUsage usage);
-- xmlSecTransformId xmlSecTransformIdListFindByName(xmlSecPtrListPtr list, const xmlChar *name, xmlSecTransformUsage usage);
-- void xmlSecTransformIdListDebugDump(xmlSecPtrListPtr list, FILE *output);
-- void xmlSecTransformIdListDebugXmlDump(xmlSecPtrListPtr list, FILE *output);
#define xmlSecTransformIdUnknown
-- #define xmlSecTransformBase64Id
-- xmlSecTransformId xmlSecTransformBase64GetKlass(void);
-- void xmlSecTransformBase64SetLineSize(xmlSecTransformPtr transform, xmlSecSize lineSize);
-- #define xmlSecTransformInclC14NId
-- xmlSecTransformId xmlSecTransformInclC14NGetKlass(void);
-- #define xmlSecTransformInclC14NWithCommentsId
-- xmlSecTransformId xmlSecTransformInclC14NWithCommentsGetKlass(void);
-- #define xmlSecTransformInclC14N11Id
-- xmlSecTransformId xmlSecTransformInclC14N11GetKlass(void);
-- #define xmlSecTransformInclC14N11WithCommentsId
-- xmlSecTransformId xmlSecTransformInclC14N11WithCommentsGetKlass(void);
-- #define xmlSecTransformExclC14NId
-- xmlSecTransformId xmlSecTransformExclC14NGetKlass(void);
-- #define xmlSecTransformExclC14NWithCommentsId
-- xmlSecTransformId xmlSecTransformExclC14NWithCommentsGetKlass(void);
-- #define xmlSecTransformEnvelopedId
-- xmlSecTransformId xmlSecTransformEnvelopedGetKlass(void);
-- #define xmlSecTransformXPathId
-- xmlSecTransformId xmlSecTransformXPathGetKlass(void);
-- #define xmlSecTransformXPath2Id
-- xmlSecTransformId xmlSecTransformXPath2GetKlass(void);
-- #define xmlSecTransformXPointerId
-- xmlSecTransformId xmlSecTransformXPointerGetKlass(void);
-- int xmlSecTransformXPointerSetExpr(xmlSecTransformPtr transform, const xmlChar *expr, xmlSecNodeSetType nodeSetType, xmlNodePtr hereNode);
-- #define xmlSecTransformXsltId
-- xmlSecTransformId xmlSecTransformXsltGetKlass(void);
-- #define xmlSecTransformRemoveXmlTagsC14NId
-- xmlSecTransformId xmlSecTransformRemoveXmlTagsC14NGetKlass (void);
-- #define xmlSecTransformVisa3DHackId
-- xmlSecTransformId xmlSecTransformVisa3DHackGetKlass(void);
-- int xmlSecTransformVisa3DHackSetID(xmlSecTransformPtr transform, const xmlChar *id);
#endif

#endif
